<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>项目管理系统</title>
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="format-detection" content="telephone=no">
		<link rel="stylesheet" href="../../css/oksub.css" media="all" />
		<style type="text/css">
			.layui-col-md1 .ok-card-body {
				padding: 7px;
				font-size: 15px;
				cursor: pointer;
			}
			
			.buttonbody .layui-btn {
				width: 100%;
			}
		</style>
	</head>

	<body>
		<div class="ok-body home">
			<div class="layui-row layui-col-space15">
				<div class="layui-col-md2">
					<div class="layui-form" lay-filter="myDiv">
						<select lay-filter="mySelect" id="select" lay-search>
						</select>
					</div>
				</div>
				<div class="layui-col-md1">
					<div class="layui-card buttonbody">
						<div class="layui-btn layui-btn-normal" id="fileType3">
							<div class="cart-r">
								<div class="stat-heading"><i class="layui-icon">&#xe621;</i>产品库</div>
							</div>
						</div>
					</div>
				</div>
				<div class="layui-col-md1">
					<div class="layui-card buttonbody">
						<div class="layui-btn layui-btn-normal" id="fileType1">
							<div class="cart-r">
								<div class="stat-heading"><i class="layui-icon">&#xe621;</i>附件库</div>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="layui-row layui-col-space15">
				<div class="layui-card">
					<div class="ok-card-body ">
						<table id="table" lay-filter="table"></table>
					</div>
				</div>
			</div>
		</div>

		

	</body>
		<script type="text/javascript" src="../../lib/layui/layui.js"></script>
		<script type="text/javascript" src="../../js/jquery.min.js"></script>
		<script type="text/javascript" src="../../js/service.js"></script>
		<script type="text/javascript" src="product_file.js" ></script>
		<script>
			$(function() {
		layui.use(["form"], function() {
			getdata("/product/searchByPage", {}, "GET", function(data) {
				console.log(data);
				data = data.data;
				$.each(data, function(index, item) {
					$("#select").append(new Option(item.name, item.id));
				});
				$("#select").val("1");
				layui.form.render('select', 'myDiv');
			})
		})
	});
//			layui.use('upload', function() {
//				var upload = layui.upload;
//
//				//执行实例
//				var uploadInst = upload.render({
//					elem: '#test1', //绑定元素
//						
//					url: 'http://localhost:9014/file/upload', //上传接口
//					data: {
//						"fileType":1,
//						"loginUserName":"王昊晖",
//						"loginUserId":2,
//						"name":"需求分析.doc"
//					},
//						
//					accept: 'file' ,//允许上传的文件类型
//					method: 'POST',
//					done: function(res) {
//						//上传完毕回调
//						console.log(res);
//					},
//					error: function() {
//						//请求异常回调
//					}
//				});
//			});
		</script>
</html>